package cn.tedu.boyou.search.service;

import cn.tedu.boyou.search.query.AnswerQueryObject;
import cn.tedu.boyou.search.query.SearchQueryObject;
import cn.tedu.boyou.search.template.AnswerTemplate;
import org.springframework.data.domain.Page;

public interface IAnswerSearchService {
    void createIndex();

    void save(AnswerTemplate answerTemplate);

    /**
     * 分页查询
     * @param qo
     * @return
     */
    Page<AnswerTemplate> query(SearchQueryObject qo);

    Page<AnswerTemplate> searchWithHighlight(String indexName, String typeName, Class<AnswerTemplate> answerTemplateClass, AnswerQueryObject qo, String... fields);
}